package com.atguigu.service_helpcenter.controller.front;


import com.atguigu.commonutils.JwtUtils;
import com.atguigu.commonutils.R;
import com.atguigu.service_helpcenter.entity.HelpCenter;
import com.atguigu.service_helpcenter.service.impl.HelpCenterServiceImpl;
import io.swagger.annotations.Api;
import io.swagger.annotations.ApiOperation;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.web.bind.annotation.*;

import javax.servlet.http.HttpServletRequest;

/**
 * <p>
 *  前端控制器
 * </p>
 *
 * @author ZhuangLiJiao
 * @since 2022-01-06
 */
@Api(description = "帮助反馈管理")
@RestController
@RequestMapping("/helpservice/")
@CrossOrigin
public class HelpCenterController {

    @Autowired
    private HelpCenterServiceImpl helpCenterService;

    @PostMapping("saveHelpCenter")
    public R saveHelpCenter(@RequestBody HelpCenter centerobj) {
        System.out.println("======================--0-43-4-- -- -3403-4 ========================");
        System.out.println(centerobj);
        boolean b = helpCenterService.save(centerobj);
        if (b) {
            return R.ok();
        } else {
            return R.error();
        }
    }
}

